﻿package cn.itlaobing.dao;

import cn.itlaobing.entity.ItlbAreas;
import org.apache.commons.dbutils.QueryRunner;
import org.apache.commons.dbutils.handlers.BeanListHandler;

import java.sql.SQLException;
import java.util.List;

/**
 * 类名: cn.itlaobing.dao
 * 功能: 区域数据访问层
 * 作者: 
 * 日期: 2017/11/14 21:27
 */
public class ItlbAreasDao extends BaseDao {
    /*
        查询所有区域
     */
    public List<ItlbAreas> QueryAllItlbAreas() throws SQLException {
        String sql="select * from itlb_areas";
        QueryRunner qr=new QueryRunner(getDataSource());
        BeanListHandler<ItlbAreas> iabl=new BeanListHandler(ItlbAreas.class);
        return qr.query(sql,iabl);
    }
}
